using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VEKBANF
    {
        public DataRow Convert2EKBANF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryEKBANF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["EKBMANDANT"] = " ".PadRight(2 ); 
         dwReturn["EKBAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["EKBAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["EKBAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["EKBAENZL"] = " ".PadRight(0 ); 
         dwReturn["EKBAENB"] = " ".PadRight(8 ); 
         dwReturn["EKBAEND"] = " ".PadRight(0 ); 
         dwReturn["EKBNEUB"] = " ".PadRight(8 ); 
         dwReturn["EKBNEUD"] = " ".PadRight(0 ); 
         dwReturn["EKBARTGR"] = " ".PadRight(1 ); 
         dwReturn["EKBKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["EKBWERK"] = " ".PadRight(3 ); 
         dwReturn["EKBABT"] = " ".PadRight(3 ); 
         dwReturn["EKBWAKZ"] = " ".PadRight(1 ); 
         dwReturn["EKBART"] = " ".PadRight(20 ); 
         dwReturn["EKBVAR"] = " ".PadRight(3 ); 
         dwReturn["EKBFARBE"] = " ".PadRight(10 ); 
         dwReturn["EKBDESS"] = " ".PadRight(10 ); 
         dwReturn["EKBCOL"] = " ".PadRight(10 ); 
         dwReturn["EKBBESCH"] = " ".PadRight(10 ); 
         dwReturn["EKBZUSTAND"] = " ".PadRight(4 ); 
         dwReturn["EKBGROE"] = " ".PadRight(7 ); 
         dwReturn["EKBSTKLGV"] = " ".PadRight(0 ); 
         dwReturn["EKBSTKLGB"] = " ".PadRight(0 ); 
         dwReturn["EKBSPUL"] = " ".PadRight(0 ); 
         dwReturn["EKBGEW"] = " ".PadRight(0 ); 
         dwReturn["EKBSPULM"] = " ".PadRight(0 ); 
         dwReturn["EKBVPEINH"] = " ".PadRight(4 ); 
         dwReturn["EKBAM"] = " ".PadRight(2 ); 
         dwReturn["EKBZUSAM"] = " ".PadRight(2 ); 
         dwReturn["EKBHUELSE"] = " ".PadRight(6 ); 
         dwReturn["EKBKF"] = " ".PadRight(1 ); 
         dwReturn["EKBFDRES"] = " ".PadRight(1 ); 
         dwReturn["EKBWI"] = " ".PadRight(1 ); 
         dwReturn["EKBANZTKB"] = " ".PadRight(0 ); 
         dwReturn["EKBLOSGR"] = " ".PadRight(0 ); 
         dwReturn["EKBWIRKGEW"] = " ".PadRight(0 ); 
         dwReturn["EKBMEEH"] = " ".PadRight(3 ); 
         dwReturn["EKBMEEHGRP"] = " ".PadRight(1 ); 
         dwReturn["EKBMEEHFKT"] = " ".PadRight(12 ); 
         dwReturn["EKBANFME"] = " ".PadRight(0 ); 
         dwReturn["EKBSMENGE"] = " ".PadRight(0 ); 
         dwReturn["EKBANFWE"] = " ".PadRight(0 ); 
         dwReturn["EKBWUTERM"] = " ".PadRight(0 ); 
         dwReturn["EKBPRME"] = " ".PadRight(10 ); 
         dwReturn["EKBPREH"] = " ".PadRight(3 ); 
         dwReturn["EKBPREHGRP"] = " ".PadRight(1 ); 
         dwReturn["EKBPREHFKT"] = " ".PadRight(12 ); 
         dwReturn["EKBEINZSTA"] = " ".PadRight(2 ); 
         dwReturn["EKBGESSTA"] = " ".PadRight(2 ); 
         dwReturn["EKBKOSTART"] = " ".PadRight(6 ); 
         dwReturn["EKBKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["EKBKST"] = " ".PadRight(4 ); 
         dwReturn["EKBBUDGET"] = " ".PadRight(8 ); 
         dwReturn["EKBINVAUF"] = " ".PadRight(8 ); 
         dwReturn["EKBFAUFTYP"] = " ".PadRight(1 ); 
         dwReturn["EKBFAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["EKBFAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["EKBFAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["EKBWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["EKBKURS"] = " ".PadRight(0 ); 
         dwReturn["EKBBETRAG"] = " ".PadRight(0 ); 
         dwReturn["EKBHWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["EKBHEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["EKBHEUROKURSVK"] = " ".PadRight(1 ); 
         dwReturn["EKBFEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["EKBFEUROKURSVK"] = " ".PadRight(1 ); 
         dwReturn["EKBTERMNR"] = " ".PadRight(0 ); 
         dwReturn["EKBFAELLIG"] = " ".PadRight(0 ); 
         dwReturn["EKBSICHER"] = " ".PadRight(1 ); 
         dwReturn["EKBSICHP"] = " ".PadRight(0 ); 
         dwReturn["EKBAKKRED"] = " ".PadRight(15 ); 
         dwReturn["EKBZAHLBED"] = " ".PadRight(3 ); 
         dwReturn["EKBLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["EKBLIEFNR1"] = " ".PadRight(8 ); 
         dwReturn["EKBLIEFNR2"] = " ".PadRight(8 ); 
         dwReturn["EKBLIEFNR3"] = " ".PadRight(8 ); 
         dwReturn["EKBLIEFNR4"] = " ".PadRight(8 ); 
         dwReturn["EKBLIEFNR5"] = " ".PadRight(8 ); 
         dwReturn["EKBLO"] = " ".PadRight(2 ); 
         dwReturn["EKBLB"] = " ".PadRight(2 ); 
         dwReturn["EKBLP"] = " ".PadRight(8 ); 
         dwReturn["EKBGENBENID1"] = " ".PadRight(8 ); 
         dwReturn["EKBGENDAT1"] = " ".PadRight(0 ); 
         dwReturn["EKBGENBENID2"] = " ".PadRight(8 ); 
         dwReturn["EKBGENDAT2"] = " ".PadRight(0 ); 
         dwReturn["EKBGENBENID3"] = " ".PadRight(8 ); 
         dwReturn["EKBGENDAT3"] = " ".PadRight(0 ); 
         dwReturn["EKBGENBENID4"] = " ".PadRight(8 ); 
         dwReturn["EKBGENDAT4"] = " ".PadRight(0 ); 
         dwReturn["EKBGENBENID5"] = " ".PadRight(8 ); 
         dwReturn["EKBGENDAT5"] = " ".PadRight(0 ); 
         dwReturn["EKBGENBENID6"] = " ".PadRight(8 ); 
         dwReturn["EKBGENDAT6"] = " ".PadRight(0 ); 
         dwReturn["EKBGENSTUFE"] = " ".PadRight(0 ); 
         dwReturn["EKBGENOFFEN"] = " ".PadRight(8 ); 
         dwReturn["EKBFC"] = " ".PadRight(8 ); 
         dwReturn["EKBUHR"] = " ".PadRight(0 ); 
         dwReturn["EKBVERBENID"] = " ".PadRight(8 ); 
         dwReturn["EKBVERDAT"] = " ".PadRight(0 ); 
         dwReturn["EKBABBENID"] = " ".PadRight(8 ); 
         dwReturn["EKBABGRUND"] = " ".PadRight(2 ); 
         dwReturn["EKBABDATUM"] = " ".PadRight(0 ); 
         dwReturn["EKBSACHGEB"] = " ".PadRight(3 ); 
         dwReturn["EKBPRODKL"] = " ".PadRight(7 ); 
         dwReturn["EKBMCODE"] = " ".PadRight(14 ); 
         dwReturn["EKBERLKZ"] = " ".PadRight(1 ); 
         dwReturn["EKBFILLER8"] = " ".PadRight(75 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapEKBANF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveEKBANF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryEKBANF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapEKBANF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertEKBANF(dwLocal, ITXDBVERSION);
            }
            UpdateEKBANF(dwLocal);
        }
        public void InsertEKBANF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO EKBANF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryEKBANF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM EKBANF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM EKBANF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "EKBANF";
            Return = Result;
            return Return;
        }
        public void DeleteEKBANF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM EKBANF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateEKBANF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE EKBANF SET "
                    +"EKBMANDANT= :EKBMANDANT,"
                    +"EKBAUFKRS= :EKBAUFKRS,"
                    +"EKBAUFLFD= :EKBAUFLFD,"
                    +"EKBAUFPOS= :EKBAUFPOS,"
                    +"EKBAENZL= :EKBAENZL,"
                    +"EKBAENB= :EKBAENB,"
                    +"EKBAEND= :EKBAEND,"
                    +"EKBNEUB= :EKBNEUB,"
                    +"EKBNEUD= :EKBNEUD,"
                    +"EKBARTGR= :EKBARTGR,"
                    +"EKBKUNDNR= :EKBKUNDNR,"
                    +"EKBWERK= :EKBWERK,"
                    +"EKBABT= :EKBABT,"
                    +"EKBWAKZ= :EKBWAKZ,"
                    +"EKBART= :EKBART,"
                    +"EKBVAR= :EKBVAR,"
                    +"EKBFARBE= :EKBFARBE,"
                    +"EKBDESS= :EKBDESS,"
                    +"EKBCOL= :EKBCOL,"
                    +"EKBBESCH= :EKBBESCH,"
                    +"EKBZUSTAND= :EKBZUSTAND,"
                    +"EKBGROE= :EKBGROE,"
                    +"EKBSTKLGV= :EKBSTKLGV,"
                    +"EKBSTKLGB= :EKBSTKLGB,"
                    +"EKBSPUL= :EKBSPUL,"
                    +"EKBGEW= :EKBGEW,"
                    +"EKBSPULM= :EKBSPULM,"
                    +"EKBVPEINH= :EKBVPEINH,"
                    +"EKBAM= :EKBAM,"
                    +"EKBZUSAM= :EKBZUSAM,"
                    +"EKBHUELSE= :EKBHUELSE,"
                    +"EKBKF= :EKBKF,"
                    +"EKBFDRES= :EKBFDRES,"
                    +"EKBWI= :EKBWI,"
                    +"EKBANZTKB= :EKBANZTKB,"
                    +"EKBLOSGR= :EKBLOSGR,"
                    +"EKBWIRKGEW= :EKBWIRKGEW,"
                    +"EKBMEEH= :EKBMEEH,"
                    +"EKBMEEHGRP= :EKBMEEHGRP,"
                    +"EKBMEEHFKT= :EKBMEEHFKT,"
                    +"EKBANFME= :EKBANFME,"
                    +"EKBSMENGE= :EKBSMENGE,"
                    +"EKBANFWE= :EKBANFWE,"
                    +"EKBWUTERM= :EKBWUTERM,"
                    +"EKBPRME= :EKBPRME,"
                    +"EKBPREH= :EKBPREH,"
                    +"EKBPREHGRP= :EKBPREHGRP,"
                    +"EKBPREHFKT= :EKBPREHFKT,"
                    +"EKBEINZSTA= :EKBEINZSTA,"
                    +"EKBGESSTA= :EKBGESSTA,"
                    +"EKBKOSTART= :EKBKOSTART,"
                    +"EKBKSTKRS= :EKBKSTKRS,"
                    +"EKBKST= :EKBKST,"
                    +"EKBBUDGET= :EKBBUDGET,"
                    +"EKBINVAUF= :EKBINVAUF,"
                    +"EKBFAUFTYP= :EKBFAUFTYP,"
                    +"EKBFAUFKRS= :EKBFAUFKRS,"
                    +"EKBFAUFLFD= :EKBFAUFLFD,"
                    +"EKBFAUFPOS= :EKBFAUFPOS,"
                    +"EKBWAEHRSL= :EKBWAEHRSL,"
                    +"EKBKURS= :EKBKURS,"
                    +"EKBBETRAG= :EKBBETRAG,"
                    +"EKBHWAEHRSL= :EKBHWAEHRSL,"
                    +"EKBHEUROKURS= :EKBHEUROKURS,"
                    +"EKBHEUROKURSVK= :EKBHEUROKURSVK,"
                    +"EKBFEUROKURS= :EKBFEUROKURS,"
                    +"EKBFEUROKURSVK= :EKBFEUROKURSVK,"
                    +"EKBTERMNR= :EKBTERMNR,"
                    +"EKBFAELLIG= :EKBFAELLIG,"
                    +"EKBSICHER= :EKBSICHER,"
                    +"EKBSICHP= :EKBSICHP,"
                    +"EKBAKKRED= :EKBAKKRED,"
                    +"EKBZAHLBED= :EKBZAHLBED,"
                    +"EKBLIEFBED= :EKBLIEFBED,"
                    +"EKBLIEFNR1= :EKBLIEFNR1,"
                    +"EKBLIEFNR2= :EKBLIEFNR2,"
                    +"EKBLIEFNR3= :EKBLIEFNR3,"
                    +"EKBLIEFNR4= :EKBLIEFNR4,"
                    +"EKBLIEFNR5= :EKBLIEFNR5,"
                    +"EKBLO= :EKBLO,"
                    +"EKBLB= :EKBLB,"
                    +"EKBLP= :EKBLP,"
                    +"EKBGENBENID1= :EKBGENBENID1,"
                    +"EKBGENDAT1= :EKBGENDAT1,"
                    +"EKBGENBENID2= :EKBGENBENID2,"
                    +"EKBGENDAT2= :EKBGENDAT2,"
                    +"EKBGENBENID3= :EKBGENBENID3,"
                    +"EKBGENDAT3= :EKBGENDAT3,"
                    +"EKBGENBENID4= :EKBGENBENID4,"
                    +"EKBGENDAT4= :EKBGENDAT4,"
                    +"EKBGENBENID5= :EKBGENBENID5,"
                    +"EKBGENDAT5= :EKBGENDAT5,"
                    +"EKBGENBENID6= :EKBGENBENID6,"
                    +"EKBGENDAT6= :EKBGENDAT6,"
                    +"EKBGENSTUFE= :EKBGENSTUFE,"
                    +"EKBGENOFFEN= :EKBGENOFFEN,"
                    +"EKBFC= :EKBFC,"
                    +"EKBUHR= :EKBUHR,"
                    +"EKBVERBENID= :EKBVERBENID,"
                    +"EKBVERDAT= :EKBVERDAT,"
                    +"EKBABBENID= :EKBABBENID,"
                    +"EKBABGRUND= :EKBABGRUND,"
                    +"EKBABDATUM= :EKBABDATUM,"
                    +"EKBSACHGEB= :EKBSACHGEB,"
                    +"EKBPRODKL= :EKBPRODKL,"
                    +"EKBMCODE= :EKBMCODE,"
                    +"EKBERLKZ= :EKBERLKZ,"
                    +"EKBFILLER8= :EKBFILLER8,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("EKBMANDANT", OracleType.NVarChar).Value = dwData["EKBMANDANT"].ToString(); 
          or1.Parameters.Add("EKBAUFKRS", OracleType.NVarChar).Value = dwData["EKBAUFKRS"].ToString(); 
          or1.Parameters.Add("EKBAUFLFD", OracleType.NVarChar).Value = dwData["EKBAUFLFD"].ToString(); 
          or1.Parameters.Add("EKBAUFPOS", OracleType.NVarChar).Value = dwData["EKBAUFPOS"].ToString(); 
          or1.Parameters.Add("EKBAENZL", OracleType.NVarChar).Value = dwData["EKBAENZL"].ToString(); 
          or1.Parameters.Add("EKBAENB", OracleType.NVarChar).Value = dwData["EKBAENB"].ToString(); 
          or1.Parameters.Add("EKBAEND", OracleType.NVarChar).Value = dwData["EKBAEND"].ToString(); 
          or1.Parameters.Add("EKBNEUB", OracleType.NVarChar).Value = dwData["EKBNEUB"].ToString(); 
          or1.Parameters.Add("EKBNEUD", OracleType.NVarChar).Value = dwData["EKBNEUD"].ToString(); 
          or1.Parameters.Add("EKBARTGR", OracleType.NVarChar).Value = dwData["EKBARTGR"].ToString(); 
          or1.Parameters.Add("EKBKUNDNR", OracleType.NVarChar).Value = dwData["EKBKUNDNR"].ToString(); 
          or1.Parameters.Add("EKBWERK", OracleType.NVarChar).Value = dwData["EKBWERK"].ToString(); 
          or1.Parameters.Add("EKBABT", OracleType.NVarChar).Value = dwData["EKBABT"].ToString(); 
          or1.Parameters.Add("EKBWAKZ", OracleType.NVarChar).Value = dwData["EKBWAKZ"].ToString(); 
          or1.Parameters.Add("EKBART", OracleType.NVarChar).Value = dwData["EKBART"].ToString(); 
          or1.Parameters.Add("EKBVAR", OracleType.NVarChar).Value = dwData["EKBVAR"].ToString(); 
          or1.Parameters.Add("EKBFARBE", OracleType.NVarChar).Value = dwData["EKBFARBE"].ToString(); 
          or1.Parameters.Add("EKBDESS", OracleType.NVarChar).Value = dwData["EKBDESS"].ToString(); 
          or1.Parameters.Add("EKBCOL", OracleType.NVarChar).Value = dwData["EKBCOL"].ToString(); 
          or1.Parameters.Add("EKBBESCH", OracleType.NVarChar).Value = dwData["EKBBESCH"].ToString(); 
          or1.Parameters.Add("EKBZUSTAND", OracleType.NVarChar).Value = dwData["EKBZUSTAND"].ToString(); 
          or1.Parameters.Add("EKBGROE", OracleType.NVarChar).Value = dwData["EKBGROE"].ToString(); 
          or1.Parameters.Add("EKBSTKLGV", OracleType.NVarChar).Value = dwData["EKBSTKLGV"].ToString(); 
          or1.Parameters.Add("EKBSTKLGB", OracleType.NVarChar).Value = dwData["EKBSTKLGB"].ToString(); 
          or1.Parameters.Add("EKBSPUL", OracleType.NVarChar).Value = dwData["EKBSPUL"].ToString(); 
          or1.Parameters.Add("EKBGEW", OracleType.NVarChar).Value = dwData["EKBGEW"].ToString(); 
          or1.Parameters.Add("EKBSPULM", OracleType.NVarChar).Value = dwData["EKBSPULM"].ToString(); 
          or1.Parameters.Add("EKBVPEINH", OracleType.NVarChar).Value = dwData["EKBVPEINH"].ToString(); 
          or1.Parameters.Add("EKBAM", OracleType.NVarChar).Value = dwData["EKBAM"].ToString(); 
          or1.Parameters.Add("EKBZUSAM", OracleType.NVarChar).Value = dwData["EKBZUSAM"].ToString(); 
          or1.Parameters.Add("EKBHUELSE", OracleType.NVarChar).Value = dwData["EKBHUELSE"].ToString(); 
          or1.Parameters.Add("EKBKF", OracleType.NVarChar).Value = dwData["EKBKF"].ToString(); 
          or1.Parameters.Add("EKBFDRES", OracleType.NVarChar).Value = dwData["EKBFDRES"].ToString(); 
          or1.Parameters.Add("EKBWI", OracleType.NVarChar).Value = dwData["EKBWI"].ToString(); 
          or1.Parameters.Add("EKBANZTKB", OracleType.NVarChar).Value = dwData["EKBANZTKB"].ToString(); 
          or1.Parameters.Add("EKBLOSGR", OracleType.NVarChar).Value = dwData["EKBLOSGR"].ToString(); 
          or1.Parameters.Add("EKBWIRKGEW", OracleType.NVarChar).Value = dwData["EKBWIRKGEW"].ToString(); 
          or1.Parameters.Add("EKBMEEH", OracleType.NVarChar).Value = dwData["EKBMEEH"].ToString(); 
          or1.Parameters.Add("EKBMEEHGRP", OracleType.NVarChar).Value = dwData["EKBMEEHGRP"].ToString(); 
          or1.Parameters.Add("EKBMEEHFKT", OracleType.NVarChar).Value = dwData["EKBMEEHFKT"].ToString(); 
          or1.Parameters.Add("EKBANFME", OracleType.NVarChar).Value = dwData["EKBANFME"].ToString(); 
          or1.Parameters.Add("EKBSMENGE", OracleType.NVarChar).Value = dwData["EKBSMENGE"].ToString(); 
          or1.Parameters.Add("EKBANFWE", OracleType.NVarChar).Value = dwData["EKBANFWE"].ToString(); 
          or1.Parameters.Add("EKBWUTERM", OracleType.NVarChar).Value = dwData["EKBWUTERM"].ToString(); 
          or1.Parameters.Add("EKBPRME", OracleType.NVarChar).Value = dwData["EKBPRME"].ToString(); 
          or1.Parameters.Add("EKBPREH", OracleType.NVarChar).Value = dwData["EKBPREH"].ToString(); 
          or1.Parameters.Add("EKBPREHGRP", OracleType.NVarChar).Value = dwData["EKBPREHGRP"].ToString(); 
          or1.Parameters.Add("EKBPREHFKT", OracleType.NVarChar).Value = dwData["EKBPREHFKT"].ToString(); 
          or1.Parameters.Add("EKBEINZSTA", OracleType.NVarChar).Value = dwData["EKBEINZSTA"].ToString(); 
          or1.Parameters.Add("EKBGESSTA", OracleType.NVarChar).Value = dwData["EKBGESSTA"].ToString(); 
          or1.Parameters.Add("EKBKOSTART", OracleType.NVarChar).Value = dwData["EKBKOSTART"].ToString(); 
          or1.Parameters.Add("EKBKSTKRS", OracleType.NVarChar).Value = dwData["EKBKSTKRS"].ToString(); 
          or1.Parameters.Add("EKBKST", OracleType.NVarChar).Value = dwData["EKBKST"].ToString(); 
          or1.Parameters.Add("EKBBUDGET", OracleType.NVarChar).Value = dwData["EKBBUDGET"].ToString(); 
          or1.Parameters.Add("EKBINVAUF", OracleType.NVarChar).Value = dwData["EKBINVAUF"].ToString(); 
          or1.Parameters.Add("EKBFAUFTYP", OracleType.NVarChar).Value = dwData["EKBFAUFTYP"].ToString(); 
          or1.Parameters.Add("EKBFAUFKRS", OracleType.NVarChar).Value = dwData["EKBFAUFKRS"].ToString(); 
          or1.Parameters.Add("EKBFAUFLFD", OracleType.NVarChar).Value = dwData["EKBFAUFLFD"].ToString(); 
          or1.Parameters.Add("EKBFAUFPOS", OracleType.NVarChar).Value = dwData["EKBFAUFPOS"].ToString(); 
          or1.Parameters.Add("EKBWAEHRSL", OracleType.NVarChar).Value = dwData["EKBWAEHRSL"].ToString(); 
          or1.Parameters.Add("EKBKURS", OracleType.NVarChar).Value = dwData["EKBKURS"].ToString(); 
          or1.Parameters.Add("EKBBETRAG", OracleType.NVarChar).Value = dwData["EKBBETRAG"].ToString(); 
          or1.Parameters.Add("EKBHWAEHRSL", OracleType.NVarChar).Value = dwData["EKBHWAEHRSL"].ToString(); 
          or1.Parameters.Add("EKBHEUROKURS", OracleType.NVarChar).Value = dwData["EKBHEUROKURS"].ToString(); 
          or1.Parameters.Add("EKBHEUROKURSVK", OracleType.NVarChar).Value = dwData["EKBHEUROKURSVK"].ToString(); 
          or1.Parameters.Add("EKBFEUROKURS", OracleType.NVarChar).Value = dwData["EKBFEUROKURS"].ToString(); 
          or1.Parameters.Add("EKBFEUROKURSVK", OracleType.NVarChar).Value = dwData["EKBFEUROKURSVK"].ToString(); 
          or1.Parameters.Add("EKBTERMNR", OracleType.NVarChar).Value = dwData["EKBTERMNR"].ToString(); 
          or1.Parameters.Add("EKBFAELLIG", OracleType.NVarChar).Value = dwData["EKBFAELLIG"].ToString(); 
          or1.Parameters.Add("EKBSICHER", OracleType.NVarChar).Value = dwData["EKBSICHER"].ToString(); 
          or1.Parameters.Add("EKBSICHP", OracleType.NVarChar).Value = dwData["EKBSICHP"].ToString(); 
          or1.Parameters.Add("EKBAKKRED", OracleType.NVarChar).Value = dwData["EKBAKKRED"].ToString(); 
          or1.Parameters.Add("EKBZAHLBED", OracleType.NVarChar).Value = dwData["EKBZAHLBED"].ToString(); 
          or1.Parameters.Add("EKBLIEFBED", OracleType.NVarChar).Value = dwData["EKBLIEFBED"].ToString(); 
          or1.Parameters.Add("EKBLIEFNR1", OracleType.NVarChar).Value = dwData["EKBLIEFNR1"].ToString(); 
          or1.Parameters.Add("EKBLIEFNR2", OracleType.NVarChar).Value = dwData["EKBLIEFNR2"].ToString(); 
          or1.Parameters.Add("EKBLIEFNR3", OracleType.NVarChar).Value = dwData["EKBLIEFNR3"].ToString(); 
          or1.Parameters.Add("EKBLIEFNR4", OracleType.NVarChar).Value = dwData["EKBLIEFNR4"].ToString(); 
          or1.Parameters.Add("EKBLIEFNR5", OracleType.NVarChar).Value = dwData["EKBLIEFNR5"].ToString(); 
          or1.Parameters.Add("EKBLO", OracleType.NVarChar).Value = dwData["EKBLO"].ToString(); 
          or1.Parameters.Add("EKBLB", OracleType.NVarChar).Value = dwData["EKBLB"].ToString(); 
          or1.Parameters.Add("EKBLP", OracleType.NVarChar).Value = dwData["EKBLP"].ToString(); 
          or1.Parameters.Add("EKBGENBENID1", OracleType.NVarChar).Value = dwData["EKBGENBENID1"].ToString(); 
          or1.Parameters.Add("EKBGENDAT1", OracleType.NVarChar).Value = dwData["EKBGENDAT1"].ToString(); 
          or1.Parameters.Add("EKBGENBENID2", OracleType.NVarChar).Value = dwData["EKBGENBENID2"].ToString(); 
          or1.Parameters.Add("EKBGENDAT2", OracleType.NVarChar).Value = dwData["EKBGENDAT2"].ToString(); 
          or1.Parameters.Add("EKBGENBENID3", OracleType.NVarChar).Value = dwData["EKBGENBENID3"].ToString(); 
          or1.Parameters.Add("EKBGENDAT3", OracleType.NVarChar).Value = dwData["EKBGENDAT3"].ToString(); 
          or1.Parameters.Add("EKBGENBENID4", OracleType.NVarChar).Value = dwData["EKBGENBENID4"].ToString(); 
          or1.Parameters.Add("EKBGENDAT4", OracleType.NVarChar).Value = dwData["EKBGENDAT4"].ToString(); 
          or1.Parameters.Add("EKBGENBENID5", OracleType.NVarChar).Value = dwData["EKBGENBENID5"].ToString(); 
          or1.Parameters.Add("EKBGENDAT5", OracleType.NVarChar).Value = dwData["EKBGENDAT5"].ToString(); 
          or1.Parameters.Add("EKBGENBENID6", OracleType.NVarChar).Value = dwData["EKBGENBENID6"].ToString(); 
          or1.Parameters.Add("EKBGENDAT6", OracleType.NVarChar).Value = dwData["EKBGENDAT6"].ToString(); 
          or1.Parameters.Add("EKBGENSTUFE", OracleType.NVarChar).Value = dwData["EKBGENSTUFE"].ToString(); 
          or1.Parameters.Add("EKBGENOFFEN", OracleType.NVarChar).Value = dwData["EKBGENOFFEN"].ToString(); 
          or1.Parameters.Add("EKBFC", OracleType.NVarChar).Value = dwData["EKBFC"].ToString(); 
          or1.Parameters.Add("EKBUHR", OracleType.NVarChar).Value = dwData["EKBUHR"].ToString(); 
          or1.Parameters.Add("EKBVERBENID", OracleType.NVarChar).Value = dwData["EKBVERBENID"].ToString(); 
          or1.Parameters.Add("EKBVERDAT", OracleType.NVarChar).Value = dwData["EKBVERDAT"].ToString(); 
          or1.Parameters.Add("EKBABBENID", OracleType.NVarChar).Value = dwData["EKBABBENID"].ToString(); 
          or1.Parameters.Add("EKBABGRUND", OracleType.NVarChar).Value = dwData["EKBABGRUND"].ToString(); 
          or1.Parameters.Add("EKBABDATUM", OracleType.NVarChar).Value = dwData["EKBABDATUM"].ToString(); 
          or1.Parameters.Add("EKBSACHGEB", OracleType.NVarChar).Value = dwData["EKBSACHGEB"].ToString(); 
          or1.Parameters.Add("EKBPRODKL", OracleType.NVarChar).Value = dwData["EKBPRODKL"].ToString(); 
          or1.Parameters.Add("EKBMCODE", OracleType.NVarChar).Value = dwData["EKBMCODE"].ToString(); 
          or1.Parameters.Add("EKBERLKZ", OracleType.NVarChar).Value = dwData["EKBERLKZ"].ToString(); 
          or1.Parameters.Add("EKBFILLER8", OracleType.NVarChar).Value = dwData["EKBFILLER8"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
